package gao.xiaolei.quertz;

import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.time.LocalDateTime;

@Slf4j
@DisallowConcurrentExecution
public class PrintWordJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("-----------------------------------------------------------------------------------------".concat(LocalDateTime.now().toString())
                .concat(jobExecutionContext.getJobDetail().getDescription().concat("-------------------------------------------")));
    }
}
